//
// Created by xiaoma on 2/2/21.
//

#ifndef HORSE_VM_UNIVERSE_H
#define HORSE_VM_UNIVERSE_H

#include "HiObject.h"

class HiBool;

class Universe {
public:

    static HiBool *True;
    static HiBool *False;
    static HiObject *None;

    static void genesis();

    static void destroy();
};

class HiBool : public HiObject {
public:
    static HiBool *getTrue() {
        static HiBool obj(1);
        return &obj;
    }

    static HiBool *getFalse() {
        static HiBool obj(0);
        return &obj;
    }

private:
    HiBool(int value) : value(value) {}

    int value;
};

#endif //HORSE_VM_UNIVERSE_H
